﻿using System;
using System.Linq;

using Xc.DataAccess.Core;

namespace Xc.Logics.HyperTerminalCore.Udp.ViewModels
{
    /// <summary>
    /// 包信息
    /// </summary>
    public class PackageInfoItem : ViewModelBase
    {
        int packageIndex;
        /// <summary>
        /// 包序号
        /// </summary>
        public int PackageIndex
        {
            get => packageIndex;
            set
            {
                if (packageIndex == value)
                {
                    return;
                }

                packageIndex = value;
                RaisedPropertyChanged();
            }
        }
        byte[] packageData;
        /// <summary>
        /// 升级包内容
        /// </summary>
        public byte[] PackageData
        {
            get => packageData;
            set
            {
                if (packageData == value)
                {
                    return;
                }

                packageData = value;
                RaisedPropertyChanged();
            }
        }
        ushort cRC;
        public ushort CRC
        {
            get => cRC;
            set
            {
                if (cRC == value)
                {
                    return;
                }

                cRC = value;
                RaisedPropertyChanged();
            }
        }
    }
}
